package com.fc.codegen.dto;

import com.fc.common.core.exception.CheckedException;
import lombok.Data;
import lombok.experimental.Accessors;
import org.apache.commons.configuration.Configuration;
import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.configuration.PropertiesConfiguration;

/**
 * @Description:
 * @ClassName: GenModuleVo
 * @Author: weisn
 * @Date: 2023/2/7 14:49
 * @Version: 1.0
 */
@Data
@Accessors(chain = true)
public class GenModuleDto {
    /**
     * 项目名称
     */
    private String proName;
    /**
     * 模块名称
     */
    private String moduleName;
    /**
     * 包结构
     */
    private String packageStructure;
    /**
     * groupId
     */
    private String groupId;
    /**
     * 版本号
     */
    private String versions;

    public static Configuration getConfig() {
        try {
            return new PropertiesConfiguration("generator.properties");
        }
        catch (ConfigurationException e) {
            throw new CheckedException("获取配置文件失败，", e);
        }
    }
}
